<table class="table shop-table">
    <thead>
    <tr class="shop-bg-thead">
        <th width="5%">ID</th>
        <th width="45%"><?php echo $this->translate('商品名称'); ?></th>
        <th width="15%"><?php echo $this->translate('商品状态'); ?></th>
        <th width="10%"><?php echo $this->translate('排序'); ?></th>
        <th width="10%"><?php echo $this->translate('分类推荐'); ?></th>
        <th width="15%"><?php echo $this->translate('操作'); ?></th>
    </tr>
    </thead>
    <tbody>
    <?php if($this->goodsList->getCurrentItemCount() > 0) foreach ($this->goodsList as $goodsValue) { ?>
        <tr id="in-goods-<?php echo $goodsValue[0]->getInId(); ?>">
            <td><?php echo $goodsValue[0]->getGoodsId(); ?></td>
            <td><?php echo $this->escapeHtml($goodsValue['goodsName']); ?></td>
            <td><?php echo $this->goodsHelper()->goodsState($goodsValue['goodsState']); ?></td>
            <td><input type="number" min="1" name="classGoodsSort_<?php echo $goodsValue[0]->getInId(); ?>" id="classGoodsSort_<?php echo $goodsValue[0]->getInId(); ?>" value="<?php echo $goodsValue[0]->getClassGoodsSort(); ?>" class="form-control input-sm"></td>
            <td>
                <select name="classGoodsRecommend_<?php echo $goodsValue[0]->getInId(); ?>" id="classGoodsRecommend_<?php echo $goodsValue[0]->getInId(); ?>" class="form-control input-sm">
                    <option value="0" <?php echo $goodsValue[0]->getClassGoodsRecommend() == 0 ? 'selected' : ''; ?>><?php echo $this->translate('否'); ?></option>
                    <option value="1" <?php echo $goodsValue[0]->getClassGoodsRecommend() == 1 ? 'selected' : ''; ?>><?php echo $this->translate('是'); ?></option>
                </select>
            </td>
            <td>
                <a href="javascript:;" onclick="updateClassGoods(<?php echo $goodsValue[0]->getInId(); ?>);" class="btn btn-xs btn-success"><i class="fa fa-refresh"></i> <?php echo $this->translate('更新'); ?></a>
                <?php if($this->classId != $goodsValue['classId']) { ?>
                    <a href="javascript:;" onclick="deleteNotConfirm( '<?php echo $this->url('goods-class', ['action'=>'deleteClassGoods', 'id'=>$goodsValue[0]->getInId()]); ?>', 'in-goods-<?php echo $goodsValue[0]->getInId(); ?>');" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i> <?php echo $this->translate('删除'); ?></a>
                <?php } ?>
            </td>
        </tr>
    <?php } ?>
    </tbody>
    <tfoot>
    <tr>
        <td colspan="6">
            <?php echo $this->paginationControl($this->goodsList,
                'Sliding',
                'layout/ajaxPage',
                ['route' => 'goods-class', 'params' => ['action' => 'ajaxClassGoods', 'id' => $this->classId], 'showDivId' => 'goodsListBody']); ?>
        </td>
    </tr>
    </tfoot>
</table>